package com.wenson.behavior.interpreter;

import java.util.List;

/**
 * @ClassName: Sequence
 * @Author: luowangcheng
 * @Date: 2024/6/16 18:13
 * @Description:
 */
public class Sequence implements Expression {
    private List<Expression> expressions;

    public Sequence(List<Expression> expressions) {
        this.expressions = expressions;
    }

    @Override
    public void interpret() {
        expressions.forEach(Expression::interpret);
    }
}
